package net.mushystuff.dogalogue.tapestry.components;

import java.util.List;

import org.apache.tapestry.annotations.InjectPage;
import org.apache.tapestry.annotations.OnEvent;
import org.apache.tapestry.annotations.Parameter;

import net.mushystuff.dogalogue.beans.Dog;
import net.mushystuff.dogalogue.tapestry.pages.EditDog;

public class DogTable {
	
	@Parameter(required=true)
	private List<Dog> dogs;
	
	private Dog dog;
	
	@InjectPage
	private EditDog editDogPage;
	
	@OnEvent(component="editDog")
	public EditDog EditDogLink(long dogId) {
		//editDogPage.setDogId(dogId);
		return editDogPage;
	}

	public List<Dog> getDogs() {
		return dogs;
	}

	public void setDogs(List<Dog> dogs) {
		this.dogs = dogs;
	}

	public Dog getDog() {
		return dog;
	}

	public void setDog(Dog dog) {
		this.dog = dog;
	}

}
